사이트 내 전체검색
{include 파일명.php} 처리 (파일명 치환 처리)
로빈아빠
https://cmd.kr/javascript/835 URL이 복사되었습니다.

본문

if (strstr($view[wr_content],"{include '")) {
$n=0;
while($n++<10 && preg_match("/{include '([\x21-\xff]*)'}/i",$view[wr_content],$reg)) {
if (!$reg[1] || strlen($reg[1])<4) continue;
$extend=get_extend($reg[1]);
if ($extend!=".php" && $extend!=".html") continue;
if (strstr($reg[1],"config.")) continue;
$file1=str_replace("\$",$g4[path],$reg[1]);
$file1=str_replace("@",$g4[ar_skin_path],$file1);
//echo "$reg[1],$file1<BR>";
if (!is_file($file1)) {
$view[wr_content] = str_replace("{include '$reg[1]'}","check file: $file1",$view[wr_content]);
continue;
}

ob_start();
include $file1;
$out = ob_get_clean(); // append this to $html and empty buffer
$view[wr_content] = str_replace("{include '$reg[1]'}",$out,$view[wr_content]);
}
}

댓글목록

등록된 댓글이 없습니다.

831 (2/17P)

Search

Copyright © Cmd 명령어 3.141.42.84